package com.jindianjichi.common.enums;

import lombok.Getter;

@Getter
public enum SubjectTypeEnum {

    RADI0(1, "单选"),
    MULTIPLE(2, "多选"),
    JUDGE(3, "判断"),
    BRIEF(4, "简答"),
    ;

    private Integer code;
    private String desc;

    SubjectTypeEnum(Integer code, String desc){
        this.code = code;
        this.desc = desc;
    }

    public  static SubjectTypeEnum getByCode(Integer code){
        for (SubjectTypeEnum value : values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return null;
    }
}
